<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <form name="form1">
      <p>
        <input type="text" name="i1" />
      </p>
      <p>
        <input type="text" name="i2" />
      </p>
      <p>
        <input type="text" name="i3" />
      </p>
    </form>
    <script>
      // console.log(document.form1);
      // console.log(document.form1.elements[0]);
      // console.log(document.form1.elements["i1"]);
      console.log(document.form1.i1);
      console.log(document.form1.i2);
      console.log(document.form1.i3);
    </script>
  </body>
</html>
